cmake_minimum_required(VERSION 3.14)
project(gtest_)
set(CMAKE_CXX_STANDARD 17)

# 添加依赖头文件
set(INCLUDE ${PROJECT_SOURCE_DIR}/include)
set(TESTED_INCLUDE ${PARENT_SOURCE_PATH}/src)
set(TESTED_INCLUDE2 ${PARENT_SOURCE_PATH}/src/include)

include_directories(${INCLUDE} ${TESTED_INCLUDE} ${TESTED_INCLUDE2})

message(gtest_DIR:${CMAKE_CURRENT_SOURCE_DIR})

#get_filename_component(PARENT_DIR ${PROJECT_BINARY_DIR} DIRECTORY)



IF (APPLE)
    set(GTEST_LIB ${PARENT_SOURCE_PATH}/lib-macos/)

    set(TESTED ${PARENT_OUTPUT_PATH}/lib)

    set(LIB ${PARENT_SOURCE_PATH}/lib-macos/)
    link_directories(${GTEST_LIB} ${TESTED})
    link_libraries(libgtest.a libgtest_main.a libsrc_test.a)
    link_directories(${LIB})
    link_libraries(libimgui.dylib libglad.dylib libglfw.3.dylib libassimp.dylib libfmod.dylib libbox2d.a libstb_image.a)
ELSEIF (WINDOWS)
    set(LIB ${PARENT_SOURCE_PATH}/lib-windows/)
    link_directories(${LIB})
    link_libraries(glad.lib glfw3.lib libSOIL.a)

ELSEIF (LINUX)
ENDIF ()

AUX_SOURCE_DIRECTORY(. DIR_SRC_TESTS)
add_executable(gtest_ ${DIR_SRC_TESTS})